<script language="javascript" type="text/javascript" src="__PUBLIC__/js/My97DatePicker/WdatePicker.js"></script>
<div class="list-menu">
<form method="get" action="">
<!--<a href="javascript:;" onclick="" class="button-blue">上架</a>-->
<a href="{:U(MODULE_NAME.'/Product/trach')}" class="button-red">回收站</a>
&nbsp;&nbsp;  
<input type="text" name="keywords" title="关键字" class="search-ipt" value="{$keyword}">
<input type="submit" class="button-blue" value="查  询" id="keywords">
</form>
</div>
<table class="list">
		<thead>
		<tr>
	        <th>编号</th>
	        <th>图片</th> 
	        <th>标题</th>
	        <th>分类</th>
	        <th>供应商</th>
	        <th>发布时间</th>
	        <th>操作</th>
      	</tr>
		</thead>
         <tbody>
		<foreach name='vlist' item='v'>
        <tr>
           <td>{$v.id}</td>
            <td>
              <img src="<if condition='$v.litpic eq null'>__PUBLIC__/image/product.jpg<else/>{$website_url}{$v.litpic}</if>" width="300" />
           </td> 
           <td>{$v.title}</td>
           <td>
           		<foreach name="v.catename" item="cate" >
                {$cate}
              	</foreach>
            </td>
           <td>{$v.supplier}</td>
           <td>{$v.dateline|date='Y-m-d H:i:s', ###}</td>
           <td>
               <a href="http://www.tripvip.cn/Product/details/id/{$v['id']}" target="_blank" class="button-blue">查看</a>
               <a href="{:U(MODULE_NAME.'/Product/edit',array('id' => $v['id']), '')}" class="button-blue">编辑</a>
               <a href="javascript:" onclick="Up('{$v['id']}','{$v['title']}')" class="button-green">上架</a>
               <a href="javascript:;" onclick="toConfirm('{:U(MODULE_NAME.'/Product/del',array('id' => $v['id']), '')}', '确实要删除吗？')" class="button-red" >删除</a>
           </td>
       </tr>
      </foreach>
 </tbody>
</table>
<div class="page" style="clear: both;">{$page}</div>
<script type="text/javascript">
function Up(id,title)
{
	var pageii = $.layer({
	    type: 1,
	    title: '产品上架',
	    area: ['auto', 'auto'],
	    shift: 'top', //从左动画弹出
	    page: {
	        html: '<div class="layer-content"><form method="post" id="form_do" name="form_do" action="/Home/Product/marketIn.html"><p>你现在上架的是：'+title+'</p><p>上架时间：<input class="Wdate" type="text" style="width:120px;padding:2px 5px;" onclick="WdatePicker()" name="enddate" value=""></p><p><input type="hidden" name="id" value="'+id+'"><a href="javascript:" onclick="$(\'#form_do\').submit();"class="button-blue">确定</a> <a href="javascript:" class="button-red layer-close">取消</a></p></form></div>'
	    }
	});
	$('.layer-close').on('click', function(){
	    layer.close(pageii);
	});
}
</script>